﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>节点ICON </title>
    <link href="../../../DataUser/Style/ccbpm.css" rel="stylesheet" type="text/css" />
    <link href="../../Scripts/bootstrap/css/bootstrap.css" rel="stylesheet" />
    <script type="text/javascript" src="../../Scripts/bootstrap/js/jquery.min.js"></script>
    <script type="text/javascript" src="../../Scripts/config.js"></script>
    <script type="text/javascript" src="../../Comm/Gener.js"></script>
    <script src="../../Scripts/QueryString.js" type="text/javascript"></script>
    <base target="_self" />
    <script type="text/javascript" language="javascript">
        //页面启动函数.
        $(function () {

            var fk_flow = GetQueryString('FK_Flow');

            var handler = new HttpHandler("BP.WF.HttpHandler.WF_Admin_AttrFlow");
            handler.AddUrlData();
            var data = handler.DoMethodReturnString("NodesIcon_Init");


            if (data.indexOf('err@') == 0) {
                alert(data);
                return;
            }

            data = JSON.parse(data);

            //取出来两个集合.
            var nodes = data['Nodes'];
            var icons = data['ICONs'];

            for (var i = 0; i < nodes.length; i++) {

                var node = nodes[i];

                var newRow = "";
                newRow = "<tr ><td class=Idx>" + i + "</td>";
                newRow += "<td>" + node.NodeID + "</td>";
                newRow += "<td>" + node.Name + "</td>";
                newRow += "<td><img src='../ClientBin/NodeIcon/" + node.ICON + ".png' style='width:40px'  onerror=\"src='../ClientBin/NodeIcon/Default.jpg' \" />" + node.ICON + "</td>";
                newRow += "<td><a class='btn btn-xs' href=\"javascript:Chenge('" + node.NodeID + "');\" >更换</a></td>";
                newRow += "</tr>";

                $("#Table1 tr:last").after(newRow);

            }
        });

        function Chenge(nodeID) {

            var url = 'NodesIconSelect.htm?FK_Flow=' + GetQueryString("FK_Flow") + '&FK_Node=' + nodeID;
            window.location.href = url;
        }
    </script>
    <style type="text/css">
        li {
            padding: 3px 0;
        }
        caption
        {
            text-align:left;
            font-family:'Microsoft YaHei';
            font-weight:bolder;
            border-bottom:none;
            margin-bottom:10px;
        }
    </style>
</head>
<body onkeypress="Esc();" style="font-size: smaller">
    <form method="post" id="form1">
    <div style="margin: 8px">
        <table class="table table-bordered table-hover table-condensed" id="Table1" style="width: 100%">
            <caption><img style="vertical-align:middle" src='../../Img/Event.png' />
                节点icons维护,用户流程图、流程轨迹的显示.
            </caption>
            <tr>
                <th>
                    序
                </th>
                <th>
                    节点ID
                </th>
                <th>
                    名称
                </th>
                <th>
                    现在的ICON
                </th>
                <th>
                    操作
                </th>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
